﻿using System;

using Exif.Interfaces;
using Exif.Jpeg.Enums;
using Exif.Jpeg.Segments;

namespace Exif.Jpeg.Segments
{
	///<summary>
	///Start Of Frame
	///</summary>
	public class SegmentSOFn : JpegSegmentBase
	{
		#region Частные поля класса

		private readonly int _number;

		#endregion

		#region Конструктор

		internal SegmentSOFn(IImageProvider parent, JpegMarker marker, int offset, int length, int number)
			: base(parent, marker, offset, length)
		{
			this._number = number;
		}

		#endregion

		#region Свойства класса

		///<summary>
		///<list type="bullet">
		///<item><term>0x0</term><description> = Baseline DCT, Huffman coding</description></item>
		///<item><term>0x1</term><description> = Extended sequential DCT, Huffman coding</description></item>
		///<item><term>0x2</term><description> = Progressive DCT, Huffman coding</description></item>
		///<item><term>0x3</term><description> = Lossless, Huffman coding</description></item>
		///<item><term>0x5</term><description> = Sequential DCT, differential Huffman coding</description></item>
		///<item><term>0x6</term><description> = Progressive DCT, differential Huffman coding</description></item>
		///<item><term>0x7</term><description> = Lossless, Differential Huffman coding</description></item>
		///<item><term>0x9</term><description> = Extended sequential DCT, arithmetic coding</description></item>
		///<item><term>0xa</term><description> = Progressive DCT, arithmetic coding</description></item>
		///<item><term>0xb</term><description> = Lossless, arithmetic coding</description></item>
		///<item><term>0xd</term><description> = Sequential DCT, differential arithmetic coding</description></item>
		///<item><term>0xe</term><description> = Progressive DCT, differential arithmetic coding</description></item>
		///<item><term>0xf</term><description> = Lossless, differential arithmetic coding</description></item>
		///</list>
		///</summary>
		public int Number
		{
			get { return this._number; }
		}

		#endregion
	}
}